0 REM SWITCHBOX by TODD HEIMARCK..COMPUTE!3/86..translated by Kevin Mykytyn..modified by don lebow¢100 BALL=84:GOTO 6900:REM subs up front¢200 POSITION CX,CY:? M$;:RETURN :REM especially THIS one!¢300 CX=SX:CY=SY:M$=SP$(WP*3+1,WP*3+3):GOSUB 200:RETURN ¢400 REM *⌠βδσá⌠⌡≥∈*¢500 FOR J=0 TO 32:LB(J,0)=0:NEXT J:NB=1¢600 GET #1,A:A$=CHR$(A)¢700 IF A$="-" THEN RETURN ¢800 IF A$="+" THEN A=(INT(RND(1)*8+1)):A$=STR$(A)¢900 IF A$<"1" OR A$>"8" THEN 600¢1000 A=VAL(A$)¢1100 LB(0,0)=1:FOR J=1 TO 3:LB(0,J)=0:NEXT J:LB(0,4)=10+A*2¢1200 EX=1:EV=0¢1300 FOR J=0 TO 32:IF LB(J,0) THEN EX=0:GOSUB 1700¢1400 NEXT J:SOUND 1,0,0,0:SOUND 3,0,0,0:SOUND 2,0,0,0:EV=EV-(EV>0):IF EX THEN RETURN ¢1500 GOTO 1200¢1600 REM *≡∮∩⌠⌠σ≥*¢1700 DY=LB(J,0):DX=LB(J,1):LY=LB(J,2):NY=LB(J,3):NX=LB(J,4)¢1800 SM=SCR+40+NX+LY*160+NY*40:IF (LY+NY) THEN POKE SM,0¢1900 LB(J,3)=(NY+1)-4*(INT((NY+1)/4)):ON NY+1 GOTO 2000,2200,2600,2700¢2000 IF LY>4 THEN LB(J,0)=0:GOTO 3300¢2100 POKE SM+40,BALL:ON INT(RND(1)*3+1) GOTO 3900,4000,4100¢2200 VX=0:GOSUB 3200:IF SX(WY,WX)=0 OR (SW(WY,WX)=SD)=0 THEN 2400¢2300 VX=1-2*SD:LB(J,1)=VX:LB(J,3)=NY+1:LB(J,4)=NX+VX:POKE SM+40+VX,BALL:GOTO 4300¢2400 IF SW(WY,WX)=SD THEN LB(J,0)=0:SX(WY,WX)=1:POKE SM+40,BALL:GOTO 4200¢2500 LB(J,3)=NY+1:POKE SM+40,BALL:ON INT(RND(1)*3+1) GOTO 3900,4000,4100¢2600 LB(J,1)=0:LB(J,4)=NX+DX:POKE SM+40+DX,BALL:GOTO 4500¢2700 LB(J,2)=LY+1:POKE SM+40,BALL:GOSUB 3200:SW(WY,WX)=1-SW(WY,WX)¢2800 IF SX(WY,WX)=0 THEN 3100¢2900 LB(NB,0)=1:LB(NB,1)=0:LB(NB,2)=LY:LB(NB,3)=0:LB(NB,4)=NX+2-SD*4:NB=NB+1¢3000 SX(WY,WX)=0:POKE SM-40+2-SD*4,0:GOSUB 4600¢3100 SX=12-WY*2+WX*4:SY=4+WY*4:WP=SW(WY,WX):GOSUB 300:GOTO 4300¢3200 WY=LY:JX=(NX/2)+LY-6:WX=INT(JX/2):SD=JX-2*(INT(JX/2)):RETURN ¢3300 SF=PT(RR,NX/2-1)¢3400 SG=SC(QR,RR)+SF¢3500 TX=5+31*QR-(SG>9)-(SG>99)-(SG>999)¢3600 TY=1+RR:A$=STR$(SG)¢3700 CX=TX:CY=TY:M$=A$:GOSUB 200:SC(QR,RR)=SG:GOTO 4700¢3800 REM *Γ∩∩≡≤»Γ∮σσ≡≤*¢3900 SOUND 1,60,10,10:GOTO 4400¢4000 SOUND 1,121,10,10:GOTO 4400¢4100 SOUND 1,81,10,10:GOTO 4400¢4200 FOR A=10 TO 30 STEP 3:SOUND 1,A,10,10:NEXT A:SOUND 1,0,0,0:RETURN ¢4300 RETURN ¢4400 SOUND 1,0,0,0:RETURN ¢4500 FOR A=40 TO 20 STEP -3:SOUND 1,A,10,10:NEXT A:SOUND 1,0,0,0:RETURN ¢4600 SOUND 2,40,10,15:FOR ZZ=1 TO 5:NEXT ZZ:SOUND 2,0,0,0:EV=15:RETURN ¢4700 FOR ZZ=0 TO 121 STEP 8:SOUND 2,ZZ,10,10:NEXT ZZ:SOUND 2,0,0,0¢4800 RETURN ¢4900 REM *ϕβΘ∈á∮∩∩≡*¢5000 FOR RR=1 TO 4:TX=SCR+48+40*RR:POKE TX,96:POKE TX+22,96¢5100 GOSUB 10300¢5200 QR=1-QR:TY=QR*20:TX=28-TY:CX=TX:CY=0¢5300 M$=STR$(PT(RR,0)):M$(3,3)=" "¢5400 GOSUB 200:TX=8+TY:CX=TX:CY=0:M$=AR$(QR*3+1,QR*3+3):GOSUB 200¢5500 GOSUB 500:IF SC(1-QR,RR)>=PT(RR,0) THEN 5800¢5600 GOTO 5200¢5700 REM *≥∩⌡∈Σáσ∈Σ»≤π∩≥σ*¢5800 FOR J=0 TO 1:FOR K=5 TO 8:SC(J,K)=0:NEXT K:NEXT J¢5900 FOR J=0 TO 1:FOR K=1 TO 4:GL=PT(K,0):AC=SC(J,K):SC(J,5)=SC(J,5)+AC¢6000 SC(J,6)=SC(J,6)+(AC>=GL)*GL:SC(J,7)=SC(J,7)+(SC(J,K)-SC(1-J,K)):NEXT K:NEXT J¢6100 FOR J=0 TO 1:FOR K=6 TO 7:SC(J,K)=SC(J,K)+SC(J,5):NEXT K:NEXT J¢6200 FOR J=0 TO 1:FOR K=5 TO 7:SC(J,8)=SC(J,8)+SC(J,K):NEXT K:NEXT J¢6300 FOR J=0 TO 1:FOR K=5 TO 8:Y$=STR$(SC(J,K)):L=LEN(Y$):TX=6+J*31-L¢6400 TY=3+K:CX=TX-(TX<20):CY=TY:M$=Y$:GOSUB 200:NEXT K:NEXT J¢6500 REM *σ∈ΣáϕβΘ∈á∮∩∩≡*¢6600 NEXT RR¢6700 GET #1,TK:RUN ¢6800 REM *Θ∈Θ⌠*¢6900 OPEN #1,4,0,"K:":SCR=PEEK(88)+256*PEEK(89):POKE 82,0:POKE 752,0¢7000 DIM SW(4,7),SX(4,7),SP$(6),LB(32,4),AR$(6),PT(4,16),SC(1,8),P1$(20),P2$(20)¢7100 DIM M$(20),T$(20),Y$(10),R$(10),L$(10),A$(5)¢7200 FOR A=0 TO 1:FOR B=0 TO 8:SC(A,B)=0:NEXT B:NEXT A¢7300 SP$(1,3)="è
":SP$(4,6)="✓ê":AR$(1,3)="<- ":AR$(4,6)=" ->":QR=1¢7400 POKE 710,156:POKE 709,0:POKE 712,PEEK(710)¢7500 FOR J=1 TO 4:READ Q:PT(J,0)=Q:REM ¢7600 FOR K=1 TO 8:READ L:PT(J,K+8)=L:PT(J,9-K)=L:NEXT K:NEXT J:REM ¢7700 REM *≤π∩≥Θ∈τáΣβ⌠β*¢7800 DATA 10¢7900 DATA 2,2,2,2,2,2,2,2¢8000 DATA 40¢8100 DATA 1,2,3,5,8,13,21,34¢8200 DATA 20¢8300 DATA 2,3,4,5,6,7,8,9¢8400 DATA 80¢8500 DATA 1,4,9,16,25,36,49,64¢8600 REM *≤⌠β≥⌠*¢8700 ? "}":? "PLAYER 1 ";:INPUT P1$¢8800 ? "PLAYER 2 ";:INPUT P2$:IF LEN(P1$)>5 THEN P1$=P1$(1,5)¢8900 IF LEN(P2$)>5 THEN P2$=P2$(1,5)¢9000 ? :? P1$;" VS ";P2$¢9100 ? "IS THIS CORRECT?":GET #1,A:IF CHR$(A)<>"Y" THEN 8700¢9200 POKE 752,1¢9300 ? "}";:? "
";:FOR J=1 TO 7:? " ";:NEXT J:? " ✓":LL=7¢9400 FOR J=0 TO 4:TX=9-2*J:TY=1+J*4:R$="| "¢9500 FOR K=1 TO 2:CX=TX:CY=TY+K-1:M$="":GOSUB 200¢9600 ? " á ";:GOSUB 10200:? "á":NEXT K¢9700 CX=TX:CY=TY+K-1:M$="":GOSUB 200¢9800 ? " ✓á ";:GOSUB 10200:? "á
";:NEXT J¢10000 ? :? "á ";:GOSUB 10200:? "á"¢10100 R$=" ":LL=LL+1:? " ê";:GOSUB 10200:? "è":GOTO 10800¢10200 FOR L=1 TO LL:? R$;:NEXT L:RETURN ¢10300 FOR J=1 TO 16:K=PT(RR,J):JJ=2+J*2¢10400 IF K>9 THEN L=INT(K/10):T$=STR$(L):L$=T$(1,1):GOTO 10600¢10500 L$=CHR$(32)¢10600 CX=JJ:CY=22:M$=L$:GOSUB 200:CX=JJ:CY=23:T$=STR$(K):M$=T$(LEN(T$),LEN(T$)):GOSUB 200¢10700 NEXT J:RETURN ¢10800 FOR J=0 TO 4:SY=4+J*4:FOR K=0 TO J+3:SX=12-J*2+K*4¢10900 CX=SX+1:CY=SY-1:M$=" ":GOSUB 200¢11000 M$=" ":CX=SX+1:CY=SY-1:GOSUB 200:WP=INT(RND(1)*2)¢11100 SW(J,K)=WP:SX(J,K)=0:GOSUB 300¢11200 NEXT K:NEXT J¢11300 FOR J=1 TO 8:POKE SCR+50+J*2,16+J:NEXT J¢11400 FOR J=0 TO 1:BX=J*31:CX=BX:CY=0:M$="":GOSUB 200¢11500 ? " ";¢11600 FOR K=1 TO 5:CX=BX:CY=K:M$="":GOSUB 200:? "⑨ Ö";:NEXT K¢11700 CX=BX:CY=K:M$="":GOSUB 200¢11800 ? " ";¢11900 NEXT J:FOR TK=1 TO LEN(P1$):P1$(TK,TK)=CHR$(ASC(P1$(TK,TK))+128):NEXT TK¢12000 FOR TK=1 TO LEN(P2$):P2$(TK,TK)=CHR$(ASC(P2$(TK,TK))+128):NEXT TK¢12100 CX=3-(LEN(P1$)=5):CY=0:M$=P1$:GOSUB 200¢12200 CX=34-(LEN(P2$)=5):CY=0:M$=P2$:GOSUB 200¢12300 REM *τ∩í*¢12400 GOTO 5000¢